﻿using Archiecture.API.Application.Commands.DeepCommand;
using Architecture.Domain.Dto.Source;
using Architercture.Domain.Service.IService;
using MediatR;

namespace Archiecture.API.Application.CommandHandlers.DeepCommandHandler
{
    public class CertificationListCommandHandler : IRequestHandler<CertificationListCommand, List<ImgDto>>
    {
        private readonly IDeepProcessService _deepService;

        public CertificationListCommandHandler(IDeepProcessService deepService)
        {
            _deepService = deepService;
        }

        public async Task<List<ImgDto>> Handle(CertificationListCommand request, CancellationToken cancellationToken)
        {
            return await _deepService.GetCertificateList(request.batchCode);
        }
    }
}
